class CQueue:

    def __init__(self):
        self.stack1=[]
        self.stack2=[]

    def appendTail(self, value: int) -> None:
        self.stack1.append(value)

    def deleteHead(self) -> int:
        if len(self.stack2)==0:
            #已经没有元素了
            if len(self.stack1)==0:
                return -1
            else:
                #存在元素
                while len(self.stack1)>0:
                    top=self.stack1.pop()
                    self.stack2.append(top)
                return self.stack2.pop()
        return self.stack2.pop()

# Your CQueue object will be instantiated and called as such:
obj = CQueue()
obj.appendTail(3)
param_2 = obj.deleteHead()
param_3=obj.deleteHead()
print(param_2)
print(param_3)